// createRouter: 创建路由实例对象
// 改为哈希路由模式
// createWebHistory: 创建history模式的路由（hash / history）

import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  // 改为历史路由模式
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      redirect: '/bigScreen',
      component: HomeView
    },
    {
      path: '/bigScreen',
      name: 'bigScreen',
      component: () => import('@/views/BigScreen.vue')
    }
  ]
})

export default router
